unit Class_Impt_IN_GKZF;

interface
uses
  Classes,SysUtils,Class_GKJG_FL_IN_GKZF,UniEngine;
  
type
  TTitlNode=class(TObject)
  public
    TitlIdex:Integer;
    TitlCode:string;
    TitlText:string;
  public
    class function  CopyIt(ATitlNode:TTitlNode):TTitlNode;overload;
    class procedure CopyIt(ATitlNode:TTitlNode;var Result:TTitlNode);overload;
  end;

  TMachNodeInCachData=class;
  
  TMachNode=class(TObject)
  public
    GKJGFL:TGKJGFL;
    TitlND:TTitlNode;
  public
    constructor Create;
    destructor Destroy; override;
  public
    class procedure CopyTo(AMachNode:TMachNode;var Result:TMachNodeInCachData);overload;
  end;

  TExclPosXInCachData=class(TUniEngine)
  private
    FTitlRows:Integer;
    FTitlStaX:Integer;
  published
    property TitlRows:Integer  read FTitlRows write FTitlRows;
    property TitlStaX:Integer  read FTitlStaX write FTitlStaX;
  end;
  
  TMachNodeInCachData=class(TUniEngine)
  private
    FUnitLink: string;
    FGKJGIDEX: Integer;
    FGKJGFLID: Integer;
    FTitlIdex: Integer;
    FTitlCode: string;
    FTitlText: string;
  published
    property UnitLink: string read FUnitLink write FUnitLink;
    property GKJGIDEX: Integer read FGkjgIdex write FGkjgIdex;
    property GKJGFLID: Integer read FGkjgFlid write FGkjgFlid;
    property TitlIdex: Integer read FTitlIdex write FTitlIdex;
    property TitlCode: string read FTitlCode write FTitlCode;
    property TitlText: string read FTitlText write FTitlText;
  end;

implementation

{ TTitlNode }

class function TTitlNode.CopyIt(ATitlNode: TTitlNode): TTitlNode;
begin
  Result:=TTitlNode.Create;
  TTitlNode.CopyIt(ATitlNode,Result);
end;


class procedure TTitlNode.CopyIt(ATitlNode: TTitlNode;
  var Result: TTitlNode);
begin
  Result.TitlIdex:=ATitlNode.TitlIdex;
  Result.TitlCode:=ATitlNode.TitlCode;
  Result.TitlText:=ATitlNode.TitlText;
end;


class procedure TMachNode.CopyTo(AMachNode: TMachNode;
  var Result: TMachNodeInCachData);
begin
  Result.FUnitLink:=AMachNode.GKJGFL.UNITLINK;
  Result.FGKJGIDEX:=AMachNode.GKJGFL.GKJGIDEX;
  Result.FGKJGFLID:=AMachNode.GKJGFL.GKJGFLID;
  Result.FTitlIdex:=AMachNode.TitlND.TitlIdex;
  Result.FTitlCode:=AMachNode.TitlND.TitlCode;
  Result.FTitlText:=AMachNode.TitlND.TitlText;
end;

constructor TMachNode.Create;
begin
  GKJGFL:=TGKJGFL.Create;
  TitlND:=TTitlNode.Create;
end;

destructor TMachNode.Destroy;
begin
  if GKJGFL<>nil then FreeAndNil(GKJGFL);
  if TitlND<>nil then FreeAndNil(TITLND);
  inherited;
end;

end.
